import request from '@/utils/request';

export default {
    getProvinces() {
        return request({
            url: '/areaSetting/provinces',
            method: 'GET'
        });
    },
    addProvince(data) {
        return request({
            url: '/areaSetting/addProvince',
            method: 'POST',
            data
        });
    },
    getCities(provinceId) {
        return request({
            url: '/areaSetting/cities',
            method: 'GET',
            params: { provinceId }
        });
    },
    addCity(data) {
        return request({
            url: '/areaSetting/addCity',
            method: 'POST',
            data
        });
    },
    remove(id) {
        return request({
            url: '/areaSetting/' + id,
            method: 'DELETE'
        });
    }
};
